package com.master.train.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.master.train.business.dao.TrainStationDao;
import com.master.train.business.entity.TrainStationEntity;
import com.master.train.business.service.TrainStationService;
import com.master.train.common.utils.PageUtils;
import com.master.train.common.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("trainStationService")
public class TrainStationServiceImpl extends ServiceImpl<TrainStationDao, TrainStationEntity> implements TrainStationService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TrainStationEntity> page = this.page(
                new Query<TrainStationEntity>().getPage(params),
                new QueryWrapper<TrainStationEntity>()
        );

        return new PageUtils(page);
    }

}